--
-- Author: mm
-- Date: 2018-08-17 14:14:47
--
-- NewerbattleguideModel
-- 新手战斗引导数据

local BattleGuideRole = import(".BattleGuideRole")

local fileName = string.getModeName(...)
local ClassRef = class(fileName, app.mvc.ModelBase)

function ClassRef:ctor(data)
    self.super.ctor(self, data)
end

function ClassRef:init()
	self._guideRoles = nil
end

function ClassRef:getGuideRoles()
	if not self._guideRoles then
		local roles = {}
		local confs = GD:getBattleGuideConfs()
		local role
		for _,conf in pairs(confs) do
			role = BattleGuideRole.new(conf)
			roles[#roles + 1] = role
		end
		table.sort(roles, function(a, b)
			return a.id < b.id
		end)
		self._guideRoles = roles
	end
	return self._guideRoles
end

------------------------ receive ------------------------


------------------------ request ------------------------

return ClassRef
